package com.ljl.question3;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 启动类
 *
 * @author ljl
 */
@SpringBootApplication
public class ApplicationMain {
    /**
     * 启动方法
     *
     * @param args 参数
     */
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(ApplicationMain.class, args);
        // 发布消息
        MqttService service = run.getBean(MqttService.class);
        service.sendData("this message is from Java");
    }
}